#define DEBUG
#include <cstdio>
#define MAXN 500000
#define MAXLOGN 19

using namespace std;

int min(int a, int b) {
  return a<b ? a : b;
}

int gcd(int a, int b) {
  for (int r=a%b; r; a=b, b=r, r=a%b);
  return b;
}

void initR(int r[][MAXN+1], int f(int, int), int n) {
  for (int i=1; i<=MAXLOGN; i++) {
    for (int j=1; j+(1<<i)-1<=n; j++) {
      r[i][j] = f(r[i-1][j], r[i-1][j+(1<<(i-1))]);
    }
  }
}

int getR(int o[][MAXN+1], int f(int, int), int l, int r) {
  int i;
  for (i=MAXLOGN; l+(1<<i)-1>r; i--);
  return f(o[i][l], o[i][r-(1<<i)+1]);
}

int main() {
#ifdef DEBUG
  freopen("1.in", "r", stdin);
  freopen("1.out", "w", stdout);
#endif

  static int a[MAXN+1], gcdr[MAXLOGN+1][MAXN+1], minr[MAXLOGN+1][MAXN+1];
  int n;
  scanf("%d", &n);
  for (int i=1; i<=n; i++) {
    scanf("%d", a+i);
    gcdr[0][i] = minr[0][i] = a[i];
  }
  initR(gcdr, gcd, n);
  initR(minr, min, n);

  int ans[MAXN+1], ansl=0;
  for (int l=0, r=n-1, mid; l<=r; ) {
    mid = (l+r)/2;
    for (int i=1; i<=n-mid; i++) {
      if (getR(minr, min, i, i+mid)==getR(gcdr, gcd, i, i+mid)) {
	if (ansl!=mid) {
	  ansl = mid;
	  ans[0] = 0;
	}
	ans[++ans[0]] = i;
      }
    }
    if (ansl==mid) {
      l = mid+1;
    } else {
      r = mid-1;
    }
  }
  printf("%d %d\n", ans[0], ansl);
  for (int i=1; i<=ans[0]; i++) {
    printf("%d ", ans[i]);
  }

  fcloseall();
}
